﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Rpt_Config_Resource.aspx.cs" Inherits="H2.NET.Web.Reports.Config_Resource" %>
<%@ Register Assembly="H2.NET.Controls" Namespace="H2.NET.Controls" TagPrefix="H2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>资源分类</title>
    <style type="text/css"> 
      .hidden{display:none}
      .show{display:block}
    </style> 
</head>
<body>
    <form id="form1" runat="server">
    <script type="text/javascript">
        function opt_resource(i_type)
        {
            // Save
            if(i_type == "opt_resource_add" && confirm("您确认的要保存当前设置吗？"))
            {
                __doPostBack(i_type);
            } 
            
            // Delete
            if(i_type == "opt_resource_delete" && confirm("您确认的要删除当前弹出框吗？"))
            {
                __doPostBack(i_type,"");
            }                       
        } 
        
	    function winOpenPopup(strURL,str_width,str_height,str_value,str_element,str_postback,str_multiple)
	    {
	        try
	        {
	            var var_time =new Date();
		        var winoption ="dialogWidth="+(parseInt(str_width) + 18)+"px;dialogHeight="+str_height+"px;dialogLeft: status:no; directories:yes;scrollbars:auto;Resizable=yes;";		
		        var tmp=window.showModalDialog(strURL+"&vt="+var_time,'',winoption);
        		
		        if(tmp != null &&  tmp != "" && tmp != undefined)
		        {
		            var o= eval('(' + tmp + ')'); 	
		            
		            //是否多选
		            if(str_multiple == "0")
		            {	        
		                document.getElementById(str_element).value=eval("o." + str_value);
		            }else
		            {
		                document.getElementById(str_element).value = document.getElementById(str_element).value + eval("o." + str_value) + ",";
		            }
    		        
		            //是否Postback
		            if(str_postback == "1")
		            {
		                //document.getElementById(str_element).onchange();
		                __doPostBack(str_element,"change:"  + document.getElementById(str_element).value);
		            }
		        }
		    }catch(e)
		    {
		    }
	    }                   
    </script>
    <!------------------------------------------------资源分类--------------------------------------------------->
      <div>
        <fieldset style="border:solid 1px #45A1C3; margin:0px 0px 0px 0px;">
           <legend style="font-weight: bold; font-size: 9pt; color: #45A1C3; font-family:Arial">资源分类</legend>
           <table cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td style="width: 6px; height: 48px;">
                        </td>
                    <td style="height: 48px;">
                        <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                            <tr>
                                <td style="width: 80px; height: 26px;">
                                    <font face="Arial" style="font-size: 9pt">编号：</font></td>
                                <td style="height: 26px;">
                                    <H2:Dialog ID="txt_res_no" runat="server" OnTextChanged="txt_res_no_TextChanged" Width="80px" AutoPostBack="true" MaxLength="8"></H2:Dialog><asp:Label ID="lbl_information" runat="server" Font-Names="Arial" Font-Size="9pt"
                                        ForeColor="Red" Width="290px"></asp:Label></td>
                                <td style="height: 26px">
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 80px; height: 26px;">
                                    <font face="Arial" style="font-size: 9pt">名称：</font></td>
                                <td style="height: 26px">
                                    <asp:TextBox ID="txt_res_name" runat="server" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" Height="17px" Width="260px" MaxLength="60"></asp:TextBox>
                                    <span style="font-size: 9pt; font-family: Arial">&nbsp;&nbsp;&nbsp;&nbsp;是否SQL：</span><asp:CheckBox ID="chk_res_is_sql" runat="server" AutoPostBack="True" OnCheckedChanged="chk_res_is_sql_CheckedChanged" /><span style="font-size: 9pt; font-family: Arial">&nbsp;&nbsp;&nbsp;&nbsp;数据库：</span><asp:DropDownList ID="drp_res_db" runat="server" Width="80px">
                                    </asp:DropDownList></td>
                                <td style="height: 26px">
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 80px; height: 104px" valign="top">
                                    <span style="font-size: 9pt; font-family: Arial">SQL或值：</span></td>
                                <td style="height: 104px" valign="bottom">
                                    <asp:TextBox ID="txt_res_sql" runat="server"  BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" Height="160px" TextMode="MultiLine" Width="626px"></asp:TextBox></td>
                                <td style="height: 104px" valign="bottom">
                                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%">
                                        <tr>
                                            <td style="height: 40px">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td valign="bottom" style="height:24px">
                                                <asp:Button ID="btn_delete" runat="server" Text="删除" OnClientClick="javascript:opt_resource('opt_resource_delete');" Width="70px" Visible="False" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td valign="bottom" style="height:24px">
                                    <asp:Button ID="btn_save" runat="server" Text="保存" OnClientClick="javascript:opt_resource('opt_resource_add');" Width="70px" /></td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 80px; height: 5px">
                                </td>
                                <td style="height: 5px">
                                </td>
                                <td style="height: 5px">
                                </td>
                            </tr>
                        </table>
                                    </td>
                    <td style="width: 6px; height: 48px;">
                        </td>
                </tr>
           </table>
         </fieldset>
    </div>
       
    </form>
</body>
</html>
